<?php
//利用阿里云dome来实现短信推送  发送成功返回1  发送失败返回0
header("content-type:text/html;charset=utf-8");
$tel = $_GET['tel'];
$random = rand(1000,9999);
$redis = new Redis(); 
$redis->connect("127.0.0.1",6379);  
$redis->auth("Hispot1!");
$redis->set($tel,$random);
$url = "https://pay.hispot.cn/gitscan/send-messages/demo/sendSms.php?tel=$tel&code=$random";
$return_data = file_get_contents($url);
echo $return_data;
?>